﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace View
{
    public partial class getBalance : Form
    {
        double szint;
        public getBalance()
        {
            InitializeComponent();
            ///
            /// Balance download.
            ///
            using (StreamReader sr = new StreamReader("amount.txt"))
            {
                szint = Convert.ToInt32(sr.ReadLine());

            }
        }

        private void Cancel_Click(object sender, EventArgs e)
        {
            StreamWriter sw = new StreamWriter("amount.txt");
            sw.WriteLine(szint);
            sw.Close();
            Close();
            
        }

        private void getBalance_Load(object sender, EventArgs e)
        {
            ///
            ///Balance indication.
            ///
            Model model3 = new Model(szint);
            tbBalance.Text = Convert.ToString(szint);
        }
    }
}
